package com.mars.bean;

public class C {
    private A ca;
    private B cb1;
    private B cb2;

    public C(A ca, B cb1,B cb2) {
        this.ca = ca;
        this.cb1 = cb1;
        this.cb2 = cb2;
        System.out.println("C已经被实例化");
        System.out.println(this.cb1.getName());
        System.out.println(this.cb2.getName());
    }

    public void setCa(A ca) {
        this.ca = ca;
    }

    public void setCb1(B cb1) {
        this.cb1 = cb1;
    }

    public void setCb2(B cb2) {
        this.cb2 = cb2;
    }
}
